-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[clang] Remove FEM_Indeterminable (#137661) #138337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove FEM_Indeterminable as it is unused and cannot be stored safely in an unsigned bitfield
|
@llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) ChangesRemove FEM_Indeterminable as it is unused and cannot be stored safely in an unsigned bitfield Full diff: https://github.com/llvm/llvm-project/pull/138337.diff 1 Files Affected:
diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h
index 16c35bcf49339..d16f32bf618ee 100644
--- a/clang/include/clang/Basic/LangOptions.h
+++ b/clang/include/clang/Basic/LangOptions.h
@@ -299,10 +299,7 @@ class LangOptionsBase {
};
/// Possible float expression evaluation method choices.
- enum FPEvalMethodKind {
- /// The evaluation method cannot be determined or is inconsistent for this
- /// target.
- FEM_Indeterminable = -1,
+ enum FPEvalMethodKind : unsigned {
/// Use the declared type for fp arithmetic.
FEM_Source = 0,
/// Use the type double for fp arithmetic.
|
|
@tstellar hi, I'm not sure the process for merging to a release branch, this is a minor correctness fix but it prevents a massive amount of warning spam when building with more current clangs. cc'ing @AaronBallman and @zahiraam so they see this and can weigh in on whether it is reasonable to pick this up. |
https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches |
|
@ojhunt I don't think yo need to create a PR to backport. These are the steps.
The backport should happen automatically. |
|
@zahiraam @AaronBallman I'm not sure if this warrants the cherry pick though - because we cannot actually trigger the use of FEM_Indeterminable the fact that the behavior would be wrong isn't relevant, the problem is just the warning spam you get while building with trunk clang - which could be mitigated by people disabling the warning in their cmake config? |
|
I don't see a significant need to backport the changes, which is a good thing because I don't think we can backport this: it's an ABI breaking change (changes the size of the enumeration due to gaining a fixed underlying type). |
|
I agree, it's literally just a warning correction, and people building this release of llvm with a newer clang can configure it to disable this warning - I just wasn't sure what the general policy around this kind of thing was which is why I made a PR and asked for advice :D @AaronBallman that said I'm not sure this change to the underlying type would impact anything - the unsigned and int are the same size, and the value is stored in an explicitly |
FWIW, I was thinking less about the size and more about the range of valid values for the enumeration. |
ah - I thought you were thinking in terms of the ms padding behavior :D |
Remove FEM_Indeterminable as it is unused and cannot be stored safely in an unsigned bitfield